import * as types from './mutation-types'
import Vue from 'vue'

export default {
  // 工单接受状态
  [types.SET_ORDER_RECEIVORDER](state, { orderReceivorder }) {
    if (orderReceivorder) {
      Vue.set(state.orderMonitor, 'isOn', orderReceivorder.autoOrderInitStatus)
      Vue.set(state.orderMonitor, 'currentUserId', orderReceivorder.id)
    }
  },
  // 工单监控实时更新
  [types.SET_ORDERMONITOR](state, item) {
    console.log(item)
    Vue.set(state.orderMonitor, 'isOn', item.autoOrderInitStatus)
    Vue.set(state.orderMonitor, 'currentUserId', item.agentId)
  }
}
